import logging
import os
import sys

DIR_BASE = os.path.dirname(os.path.dirname(__file__))
sys.path.append(DIR_BASE)

FILE_PATH = {
    "CONFIG":    os.path.join(DIR_BASE, "conf/config.ini"),
    "DATASET":   os.path.join(DIR_BASE, "datasets"),
    "IMAGE" :    os.path.join(DIR_BASE, "datasets/train/images"),
    "LABEL" :    os.path.join(DIR_BASE, "datasets/train/labels"),
    "DATA_YAML": os.path.join(DIR_BASE, "datasets/data.yaml"),
    "MODEL":     os.path.join(DIR_BASE, "model"),
    "SAVE_IMAGE":os.path.join(DIR_BASE, "received_images")
}

CLASS_NAMES = [
    "Tomato Bacterial Spot", "Tomato Early Blight", "Tomato Late Blight",
    "Tomato Leaf Mold", "Tomato Septoria Leaf Spot", "Tomato Spider Mites",
    "Tomato Target Spot", "Tomato Yellow Leaf Curl Virus", "Tomato Healthy",
    "Tomato Mosaic Virus"
]

CHINESE_CLASSNAME = {
    "Tomato Bacterial Spot"     : "番茄细菌性斑点病", 
    "Tomato Early blight"       : "番茄早疫病",
    "Tomato Late blight"        : "番茄晚疫病",
    "Tomato Leaf Mold"          : "番茄叶霉病",
    "Tomato Septoria leaf spot" : "番茄斑枯病",
    "Tomato Spider mites Two-spotted spider mite"       : "番茄红蜘蛛",
    "Tomato Target Spot"        : "番茄靶斑病",
    "Tomato Yellow Leaf Curl Virus" : "番茄黄化曲叶病毒",
    "Tomato healthy"            : "番茄健康",
    "Tomato mosaic virus"       : "番茄花叶病毒"
}

THREAD_POOL_SIZE = 10
BUFFER_SIZE = 4096 